import { about_detail } from "@/api/system"
import { IDENTIFY } from '../Types'

function getIdentify(){
  let identify = localStorage.getItem(IDENTIFY)
  return identify || null
}

const state = {
  identify: getIdentify(), // 请求的参数
  sKey: '@Key$Key.KeysKs_',
  baseUrl: '//pic.bjzzxxjs.cn/'
}

const mutations = {
  SET_IDENTIFY: (state, identify) => {
    state.identify = identify
    localStorage.setItem(IDENTIFY, identify)
  },
}

const actions = {
  SetIdentify({ commit }, data){
    return new Promise((resolve, reject) => {
      commit('SET_IDENTIFY',data)
      resolve(true)
    })
  },
  
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
